<template>
  <div class="order-buyoutprice-list-view">
    <ComplexTable :columns="columns" :list="tableList">
      <div class="slot-wrapper">
        <div class="operation-btn">
          <el-button type="primary" size="small">关闭订单</el-button>
          <el-button type="success" size="small">删除订单</el-button>
          <el-button type="info" size="small">打印发货单</el-button>
          <el-button type="info" size="small">批量发货</el-button>
          <el-button type="info" size="small">导出订单</el-button>
        </div>
      </div>
    </ComplexTable>
  </div>
</template>

<script>
import ComplexTable from '@/components/ComplexTable'

export default {
  name: 'BuyoutpriceOrderList',
  components: { ComplexTable },

  data() {
    return {
      tableList: [
        {
          author: 'Jose',
          comment_disabled: true,
          content_short: 'mock data',
          display_time: '2012-10-18 23:31:56',
          forecast: 35.18,
          id: 1,
          importance: 2
        }
      ]
    }
  },

  computed: {
    columns() {
      return [
        {
          label: '订单编号',
          prop: 'id',
          search: 'input'
        },
        {
          label: '提交时间',
          prop: 'author',
          search: 'date'
        },
        {
          label: '用户账号',
          prop: 'display_time',
          search: 'input'
        },
        {
          label: '订单金额',
          prop: 'display_time'
        },
        {
          label: '支付方式',
          prop: 'display_time'
        },
        {
          label: '订单来源',
          prop: 'display_time'
        },
        {
          label: '订单状态',
          prop: 'display_time'
        },
        {
          label: '操作',
          prop: 'operate',
          render: (h, data) => {
            return (
              <div>
                <el-button size="mini" type="text">
                  查看订单
                </el-button>
                <el-button size="mini" type="text">
                  关闭订单
                </el-button>
              </div>
            )
          }
        }
      ]
    }
  },

  beforeMount() {
    // console.log('asd')
  },

  methods: {
    test(data) {
      console.log('data')

      console.log(data)
    }
  }
}
</script>

<style lang="scss">
@import './index';
</style>
